using System;

namespace Triton.Common
{
	public abstract class FinalizedDisposable : IDisposable
	{
		private bool bool_0;

		public void Dispose()
		{
			Dispose(disposing: true);
			GC.SuppressFinalize(this);
		}

		public abstract void ManagedDisposed();

		public abstract void UnmanagedDisposed();

		protected virtual void Dispose(bool disposing)
		{
			if (!bool_0)
			{
				if (disposing)
				{
					ManagedDisposed();
				}
				UnmanagedDisposed();
				bool_0 = true;
			}
		}

		~FinalizedDisposable()
		{
			Dispose(disposing: false);
		}
	}
}
